﻿@using Phatent.Model.Pages

@{
    Layout = "~/Areas/Home/Views/Shared/_LeftSubNavLayout.cshtml";
}
<style>
    .block_gray { border: solid 1px #ddd; background-color: #f5f5f5; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; padding-top: 10px; }
    .block_gray ul li h4 { }
</style>

@if (Phatent.Website.WebContext.Language == "zh")
{
    <div class="t1">
        任职查询
        <span>您当前位置：首页 > 投资者关系 > 任职查询</span>
    </div>   
    
    <div class="row">
        <p style="text-indent: 2em; padding: 0px 30px; line-height: 25px">
            大知拥有一批有丰富经验，爱岗敬业的职员。大知的职员均已在其相关专业领域执业多年，并已经取得良好的业绩。大知的新职员在加入前，均需接受严格的遴选，且均为遴选中的佼佼者。 为了企业的良好发展并更加有效的为客户服务，我们建立企业职员诚信评价系统，旨在为更多的合作伙伴提供信任周全的服务。
        </p>
    </div>

    <div id="a">
        <div class="row">
            <div class="span8 offset2">
                <div class="block_gray">
                    <ul>
                        <li class="title">
                            <h4>请填写以下信息</h4>
                        </li>
                        <li>员工姓名：&nbsp;&nbsp;<input type="text" id="txtEmployeeName" /></li>
                        <li>岗&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位：&nbsp;&nbsp;<input type="text" id="txtPost" /></li>
                        <li>您的姓名：&nbsp;&nbsp;<input type="text" id="txtRealName" /></li>
                        <li>就职单位：&nbsp;&nbsp;<input type="text" id="txtUnitName" /></li>
                        <li>联系手机：&nbsp;&nbsp;<input type="tel" id="txtMobile" /></li>
                        <li>您的邮箱：&nbsp;&nbsp;<input type="email" id="txtEmail" /></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="span4 offset4">
                <br />
                <button class="btn btn-large btn-primary span12" type="button" id="btnSubmit" data-placement="top" onclick="Submit()" data-trigger="manual" data-content="对不起，此项功能正在建设中。。。">提交查询</button>
            </div>
        </div>
    </div>

    <div class="alert" id="b" style="font-size: 15px; display: none;">
        <strong>谢谢您的关注!</strong> 您的查询信息已经提交，我们会尽快联系您，并及时的将查询信息反馈至您的邮箱。
    </div> 
}
else
{
    <div class="t1">
        Post Inquiry
        <span>Your Location：Home > Investors > Post Inquiry</span>
    </div>
    
    <div class="row">
        <p style="text-indent: 2em; padding: 0px 30px; line-height: 25px">
            Dazhi Technology owns a group of employees who have rich experiences and love their jobs. The employees of Dazhi Technology have alreaady worked in the related fields for years, and has obtained excellent results. All the new employees of Dazhi shall accept the strict selection before they join in, and they are the best of candidates. In order to have an excellent development for the enterprise and serve more efficiently the customers, we have built the honesty evaluation system of the employees in order to offer the credible and thoughtful service to more partners.
        </p>
    </div>

    <div id="a">
        <div class="row">
            <div class="span8 offset2">
                <div class="block_gray">
                    <ul>
                        <li class="title">
                            <h4>Please fill in the following informations</h4>
                        </li>
                        <li>Name of employee：<br /><input type="text" id="txtEmployeeName" /></li>
                        <li>Post:<br /><input type="text" id="txtPost" /></li>
                        <li>Your Name:<br /><input type="text" id="txtRealName" /></li>
                        <li>Your Company:<br /><input type="text" id="txtUnitName" /></li>
                        <li>Your Mobile:<br /><input type="tel" id="txtMobile" /></li>
                        <li>Your Email:<br /><input type="email" id="txtEmail" /></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="span4 offset4">
                <br />
                <button class="btn btn-large btn-primary span12" type="button" id="btnSubmit" data-placement="top" onclick="Submit()" data-trigger="manual" data-content="">Submit</button>
            </div>
        </div>
    </div>

    <div class="alert" id="b" style="font-size: 15px; display: none;">
        <strong>谢谢您的关注!</strong> 您的查询信息已经提交，我们会尽快联系您，并及时的将查询信息反馈至您的邮箱。
    </div> 
}



<script>
    function Submit() {
        var err = "";
        var employeeName = $.trim($("#txtEmployeeName").val());
        var post = $.trim($("#txtPost").val());
        var realname = $.trim($("#txtRealName").val());
        var unitName = $.trim($("#txtUnitName").val());
        var mobile = $.trim($("#txtMobile").val());
        var email = $.trim($("#txtEmail").val());
        if (employeeName == "")
            err = "请输入你要查询的员工的姓名";
        if (post == "")
            err = "请输入你要查询的员工的岗位名称";
        if (realname == "")
            err = "请输入您的姓名";
        if (unitName == "")
            err = "请输入您所在单位的名称";
        if (mobile == "")
            err = "请输入您的手机号码";
        if (email == "")
            err = "请输入您的电子邮箱地址";
        if (err == "") {
            Whale.Remote.Operation({
                url: "/Home/Function/CreateEmployee",
                parameters: {
                    employeeName: $("#txtEmployeeName").val(),
                    post: $("#txtPost").val(),
                    realname: $("#txtRealName").val(),
                    unitName: $("#txtUnitName").val(),
                    mobile: $("#txtMobile").val(),
                    email: $("#txtEmail").val()
                },
                success: function (response) {
                    $("#a").hide();
                    $('#b').show();
                },
                error: function (msg) {
                    $("#btnSubmit").attr("data-content", msg);
                    $('#btnSubmit').popover('show');
                }
            });
        } else {
            $("#btnSubmit").attr("data-content", err);
            $('#btnSubmit').popover('show');
        }
    }
</script>


